
package com.abcijkxyz;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import com.abcijkxyz.dao.CityDao;
import com.abcijkxyz.mapper.CityMapper;
import com.abcijkxyz.mapper.HotelMapper;

@SpringBootApplication
public class SampleMapperApplication implements CommandLineRunner {

	@Autowired
	private CityMapper	cityMapper;

	@Autowired
	private CityDao		cityDao;

	@Autowired
	private HotelMapper	hotelMapper;

	public static void main(String[] args) {
		SpringApplication.run(SampleMapperApplication.class, args);
	}

	@Override
	public void run(String... args) throws Exception {
		System.out.println(this.cityMapper.findByState("CA"));

		System.out.println(this.cityDao.selectCityById(1));

		System.out.println(this.hotelMapper.selectByCityId(1));

	}

}
